Skip to main content

All Questions

4votes
2answers
208views

Tetris logic for interview

I would appreciate feedback on the code below which I created during an one-hour live interview session. In particular, while the interviewer pretty much said nothing during the interview, their ...
charlielao's user avatar
2votes
1answer
253views

Detecting timeouts in a stream of events

I'm trying to come up with a solution to this interview question: You have a stream of RPC requests coming into a server which is being logged. Each log entry is of the form [id, timestamp, type ('...
Eugene Yarmash's user avatar
5votes
1answer
262views

Object-oriented elevator scheduler

The elevator system has the following functions: There is one building, and the number of elevators can be set arbitrarily. Requests can be sent from outside the elevators, in this case the request ...
Hangji He's user avatar
3votes
1answer
1kviews

Small shopping cart application - Solid Principles and Clean Code

I've recently had a technical interview where I had to identify code smells and refactor an existing code by applying the SOLID principles and implementing unit tests. It is a small shopping cart ...
Laila Campos's user avatar
2votes
1answer
331views

Design Tic Tac Toe Interview Problem [Python 3]

Practicing objected oriented design. This time, it's designing the TicTacToe game. One difference between the real TicTacToe game is that I've made my TicTacToe game to have variable sized board. ...
whiteSkar's user avatar
4votes
1answer
2kviews

Design Shopping Cart System Interview Problem [Python 3]

Just practicing some objected oriented design questions. Please let me know what can be improved to be more OOD and extensible. Thank you. Functional Requirements Cart can hold multiple products A ...
whiteSkar's user avatar
2votes
1answer
1kviews

Parse a log file into separate column files

This is a follow-up to https://stackoverflow.com/questions/71194832/converting-json-based-log-into-column-format-i-e-one-file-per-column . My task is to optimize this code whose function is to convert ...
Sparsh Saxena's user avatar
4votes
1answer
185views

Return the biggest loss a client made from prices list

A hiring company gave me the following challenge: We want a function which accepts a very large list of prices (pricesLst) and returns the largest possible loss a ...
Nour's user avatar
1vote
2answers
1kviews

Interview: Drug Analyzer class

the introduction is this: You are a member of a biotechnology programming team that is responsible for creating a system for lab technicians, which will assist them with drug analysis. Your goal is ...
Gustavo Marinho's user avatar
5votes
1answer
747views

Designing an URL Shortener

Recently I was assigned a URL shortener design problem while interviewing with a well known organization. Here is the exact problem statement: Build a simple URL shortener service that will accept a ...
Kaushal28's user avatar
3votes
1answer
74views

Simple command line API client for getting quotes

Was given a take-home test as part of a job interview, which I failed due to a supposed lack of tests, logging, error handling and packaging. But I did touch upon all of these.. suggested time spent ...
M3RS's user avatar
  • 413
3votes
1answer
300views

Python script to parse XML file into Json

How are you doing? I have to make a script to parse an xml input file to a json file. I tried to do my best, but it will be nice if you could check it and help me to improve it. The idea is that I don'...
Patricio Cabo's user avatar
3votes
1answer
176views

Find minimal modulo-sum of pairs from two lists

Recently I appeared for an job challenge organised on HackerEarth. Question: There are two teams T1 and T2. Power of each player is represented in array. The rules of game are as follow. There are ...
Tanmey Rawal's user avatar
4votes
1answer
506views

strstr implementation with python and sets

Please review my strstr implementation in terms of time/space efficiency and overall readability. I am preparing for a coding assessment coming up as I am looking to pivot my career from Physics to ...
Gonzo's user avatar
3votes
2answers
1kviews

Find longest Palindromic substring

technical interview question i got from daily interview pro A palindrome is a sequence of characters that reads the same backwards and forwards. Given a string, s, find the longest palindromic ...
Razor Fire's user avatar

153050per page
close